﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          // {
          //   name: 'login',
          //   path: '/user/login',
          //   component: './user/Login',
          //   hideInPanelTab: true,
          // },
          {
            name: 'login',
            path: '/user/login',
            component: './NewLogin',
            hideInPanelTab: true,
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/',
    redirect: '/visual',
  },
  {
    path: '/welcome',
    redirect: '/dashboard',
  },
  {
    path: '/staff',
    redirect: '/staff/toll-collector',
  },
  {
    path: '/setting-config',
    redirect: '/setting-config/pda',
  },
  {
    path: '/parking-orders',
    redirect: '/parking-orders/list',
  },
  {
    path: '/system-user',
    redirect: '/system-user/list',
  },
  {
    path: '/dashboard',
    name: 'dashboard',
    icon: 'home',
    hideInPanelTab: true,
    component: './Dashboard',
  },
  {
    path: '/visual',
    name: 'visual',
    icon: 'FundOutlined',
    hideInPanelTab: true,
    component: './IntellectiveVisialPlatform',
  },
  {
    path: '/order/abnormal-audit',
    layout: false,
    hideInPanelTab: true,
    hideInMenu: true,
    name: '异常审核',
    component: './AbnormalOrder/AuditPage',
    access: 'canReadAbnormal',
  },
  {
    path: '/revenue',
    name: 'revenue',
    icon: 'TransactionOutlined',
    access: 'canReadRevenue',
    routes: [
      {
        path: '/revenue/daily',
        name: 'daily',
        component: './Revenue/Daily',
      },
      {
        path: '/revenue/history',
        name: 'history',
        component: './Revenue/History',
      },
      {
        path: '/revenue/pklot-daily',
        name: 'pklot-daily',
        component: './Revenue/PklotDaily',
      },
      {
        path: '/revenue/pklot-history',
        name: 'pklot-history',
        component: './Revenue/PklotHistory',
      },
    ],
  },
  {
    path: '/device',
    name: 'device',
    icon: 'group',
    access: 'canReadDevice',
    routes: [
      {
        path: '/device/sensor',
        name: 'sensor',
        access: 'canReadSensorDeivce',
        component: './Devices/Sensor',
      },
      {
        path: '/device/patrol',
        name: 'patrol',
        access: 'canReadPatrolDevice',
        component: './Devices/Patrol',
      },
      {
        path: '/device/patrol/more',
        name: 'patrol.more',
        hideInMenu: true,
        component: './PatrolCpn',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/parking',
    name: 'parking',
    icon: 'car',
    access: 'canReadParking',
    routes: [
      {
        path: '/parking/parkinglot',
        name: 'lot',
        access: 'canReadParkinglot',
        component: './Parking/Lot',
      },
      {
        path: '/parking/parkingspot',
        name: 'spot',
        access: 'canReadParkingspot',
        component: './Parking/Spot',
      },
      {
        path: '/parking/records',
        name: 'records',
        access: 'canReadParkingRecord',
        component: './Parking/Records',
      },
      {
        path: '/parking/failure-report',
        name: 'failure-report',
        access: 'canReadFailureReport',
        component: './Parking/FailureReport',
      },
    ],
  },
  {
    path: '/charge-rule',
    name: 'charge-rule',
    icon: 'dollar',
    access: 'canReadChargeRule',
    component: './ChargeRule',
  },
  {
    path: '/parking-orders',
    name: 'parking-orders',
    icon: 'barcode',
    // redirect: '/order/parking-list',
    access: 'canReadParkingOrder',
    routes: [
      {
        path: '/parking-orders/list',
        name: 'order-list',
        component: './ParkingOrder',
        exact: true,
      },
      {
        path: '/parking-orders/detail',
        name: 'order-detail',
        component: './ParkingOrder/Detail',
        hideInMenu: true,
        hideInPanelTab: true,
      },
      {
        path: '/parking-orders/arrear-list',
        name: 'arrear-list',
        component: './ParkingOrder/ArrearList',
      },
      {
        path: '/parking-orders/abnormal-list',
        name: 'abnormal-list',
        component: './AbnormalOrder',
        access: 'canReadAbnormal',
      },
      {
        path: '/parking-orders/refunds',
        name: 'refund-records',
        component: './RefundRecord',
      },
      {
        path: '/parking-orders/cancel-records',
        name: 'cancel-records',
        component: './ParkingOrder/CancelRecordList',
      },
      {
        path: '/parking-orders/payments',
        name: 'payments',
        access: 'canAdmin',
        component: './ParkingOrder/PaymentList',
      },
      {
        path: '/parking-orders/payflows',
        name: 'payflows',
        component: './ParkingOrder/PayFlow',
      },
      {
        path: '/parking-orders/merge',
        name: 'merge',
        access: 'canMerge',
        component: './MergeOrder',
      },
    ],
  },
  {
    path: '/staff',
    name: 'staff',
    icon: 'euro',
    access: 'canReadTollCollector',
    routes: [
      {
        path: '/staff/toll-collector',
        name: 'toll-collector',
        component: './CashierManagement/TollCollector',
      },
      {
        path: '/staff/schedule',
        name: 'schedule',
        access: 'canReadShift',
        component: './CashierManagement/Schedule',
      },
      {
        path: '/staff/signin-record',
        name: 'sign-record',
        component: './CashierManagement/TollCollector/TollerSignRecord',
      },
      {
        path: '/staff/performance',
        name: 'performance',
        component: './CashierManagement/Performance',
      },
      {
        path: '/staff/shift-config',
        name: 'shift-config',
        access: 'canReadShift',
        component: './CashierManagement/ShiftConfig',
      },

      {
        path: '/staff/oper-record',
        name: 'oper-record',
        component: './CashierManagement/TollCollector/TollerOperRecord',
      },
      {
        path: '/staff/packages',
        name: 'package-manager',
        access: 'canReadPackages',
        component: './PackageManager',
      },
    ],
  },
  {
    path: '/arrears-recovery',
    name: 'arrears-recovery',
    icon: 'reconciliation',
    access: 'canReadArrearsRecovery',
    routes: [
      {
        path: '/arrears-recovery/arrears',
        name: 'arrears',
        component: './ArrearsRecovery/Arrears',
      },
      {
        path: '/arrears-recovery/recovery',
        name: 'recovery',
        component: './ArrearsRecovery/Recovery',
      },
    ],
  },
  {
    path: '/member',
    name: 'member',
    icon: 'idcard',
    access: 'canReadMember',
    routes: [
      {
        path: '/member/cards',
        name: 'card',
        component: './Member/MemberCard/',
      },
      {
        path: '/member/record',
        name: 'record',
        component: './Member/MemberRecord/',
      },
      {
        path: '/member/renewals',
        name: 'renewals',
        component: './Member/MemberRenewal/',
      },
    ],
  },
  // {
  //   path: '/invoice',
  //   name: 'invoice',
  //   icon: 'container',
  //   access: 'canReadInvoice',
  //   routes: [
  //     {
  //       path: '/invoice/titles',
  //       name: 'titles',
  //       component: './Invoice/Title',
  //     },
  //   ],
  // },
  {
    path: '/abnormal-appeal',
    name: 'abnormal-appeal',
    icon: 'warning',
    access: 'canReadAbnormalAppeal',
    routes: [
      {
        path: '/abnormal-appeal/list',
        name: 'list',
        component: './AbnormalAppeal',
      },
    ],
  },

  {
    path: '/wechat',
    name: 'wechat',
    icon: 'wechat',
    access: 'canWechat',
    routes: [
      // {
      //   path: '/wechat/users',
      //   name: 'user',
      //   component: './Wechat/WechatUser/UserList',
      // },
      {
        path: '/wechat/web-users',
        name: 'web-users',
        icon: 'mobile',
        access: 'canReadWebUser',
        component: './Wechat/WebUser',
      },
      // {
      //   path: '/wechat/recharges',
      //   name: 'recharge',
      //   access: 'canReadWechatRecharge',
      //   component: './Wechat/WechatUser/RechargeRecords',
      // },
      {
        path: '/wechat/complaint-list',
        name: 'complaint-list',
        access: 'canAdmin',
        component: './Wechat/Complaint',
        exact: true,
      },
      {
        path: '/wechat/complaint-list/detail',
        access: 'canAdmin',
        name: 'complaint-detail',
        hideInMenu: true,
        hideInPanelTab: true,
        component: './Wechat/Complaint/Detail',
      },
    ],
  },
  {
    path: '/batch-task',
    name: 'batch-task',
    icon: 'sync',
    access: 'canReadBatchTask',
    component: './BatchTask',
  },
  {
    path: '/system-user',
    name: 'system-user',
    icon: 'team',
    access: 'canReadSystemUser',
    routes: [
      {
        path: '/system-user/list',
        name: 'list',
        component: './SystemUser',
        access: 'canReadSystemUser',
      },
      {
        path: '/system-user/auth',
        name: 'auth',
        component: './SystemUser/AuthConfig',
        access: 'canEditAuth',
        hideInPanelTab: true,
        hideInMenu: true,
      },
      {
        path: '/system-user/resource',
        name: 'resource',
        access: 'canAdmin',
        component: './SystemUser/Resource',
      },
    ],
  },
  // {
  //   path: '/system-user',
  //   name: 'system-user',
  //   icon: 'team',
  //   access: 'canReadSystemUser',
  //   component: './SystemUser',
  // },
  // {
  //   path: '/system-user/auth',
  //   name: 'system-user-auth',
  //   component: './SystemUser/AuthConfig',
  //   access: 'canEditAuth',
  //   hideInPanelTab: true,
  //   hideInMenu: true,
  // },
  {
    path: '/setting-config',
    name: 'setting-config',
    icon: 'setting',
    // TODO: 添加其他配置
    access: 'canReadSystemConfig',
    routes: [
      {
        path: '/setting-config/pda',
        name: 'pda',
        component: './PDAConfigs',
        access: 'canReadPDAConfig',
      },
      {
        path: '/setting-config/stats',
        name: 'stats',
        component: './StatsConfig',
        access: 'canReadStatsConfig',
      },
      {
        path: '/setting-config/etc',
        name: 'etc',
        component: './ETC',
        access: 'canAdmin',
      },
      {
        path: '/setting-config/ad',
        name: 'ad',
        component: './AdConfig',
        access: 'canReadAdConfig',
      },
      {
        path: '/setting-config/abo',
        name: 'abo',
        component: './AboConfig',
        access: 'canReadAboConfig',
      },
      {
        path: '/setting-config/message',
        name: 'message',
        component: './MessageConfig',
        access: 'canReadTemplate',
      },
      {
        path: '/setting-config/order',
        name: 'order',
        component: './OrderConfig',
        access: 'canReadOrderConfig',
      },
    ],
  },
  {
    path: '/sys-records',
    name: 'sys-record',
    icon: 'solution',
    access: 'canReadSysRecord',
    component: './SysRecord',
  },
  {
    path: '/account',
    name: 'account',
    icon: 'user',
    component: './user/Account',
  },
  {
    component: './404',
  },
];
